1. Field of the Invention
The present invention relates to a focus detection technology in an image pickup apparatus such as a digital camera.
2. Description of the Related Art
A phase detection method is generally well known as a conventional autofocus detection apparatus of a camera. In the phase detection method, lights transmitted through different exit pupil areas of a photographic optical system from an object are imaged on a pair of AF (autofocus) sensors to calculate a relative position of a pair of object images obtained by performing the photoelectric conversion (hereinafter, referred to as a phase difference calculation). Thus, a defocus amount of the photographic optical system can be detected.
The following object tracking autofocus detection apparatus is also known. In other words, a multi-divisional image sensor is used in addition to the AF sensor described above, and an object image that is a tracking object in a shooting image is stored as a reference image. Then, images repeatedly taken are compared with the reference image to detect an object position and further focus detection is performed for the detected object position.
For example, Japanese Patent Laid-Open No. 2009-010672 discloses an apparatus that automatically tracks a moving object to perform focus detection or focusing. FIG. 25 is a block diagram illustrating a focus detection apparatus that is disclosed in Japanese Patent Laid-Open No. 2009-010672. A position of the moving object is tracked using an image obtained from a second image pickup element 16 different from a focus detection element 10, and a focusing is performed by a signal obtained from the focus detection element 10 that corresponds to the detected object position.
However, in the focus detection apparatus disclosed in Japanese Patent Laid-Open No. 2009-010672, there is a case in which the stored reference image may be an object which is difficult to be detected by the AF. In this case, the problem that continues to take defocused pictures is generated since the object is tracked based on the AF result having low reliability. The following (1) to (4) are examples of the object which is difficult to be detected by the AF.
(1) a case where contrast is low
(2) a case where an object luminance is extremely high (a bright point such as a regular reflection light of sunlight)
(3) a case where a color combination of the contrast is not appropriate (such as an edge contrast of blue and red)
(4) a case where an oblique contrast with respect to an AF sensor (line sensor)
When the reference image is (1), the reliability of the phase difference calculation is low because the contrast of the image signal obtained by the AF sensor is low, and therefore the AF can never be performed although the object tracking can be performed. When the reference image is (2), the image signal obtained by the AF sensor is saturated, and an accurate image signal cannot be obtained. When the reference image is (3), the image signal obtained by the AF sensor is distorted and an error is generated in a correlation calculation result because the image signals having different wavelengths are imaged on different focal positions by the influence of a chromatic aberration of the photographic optical system. When the reference image is (4), the center of gravity of the image signal obtained by the AF sensor is shifted and an error is generated in the phase difference calculation result due to a manufacturing adjustment position error of optical axes of the AF sensor and the AF imaging lens.
Generally, since the AF sensor is constituted by a line sensor that cannot detect a color, the object of (3) or (4) cannot be determined based on the image signal obtained by the AF sensor. Therefore, even if the object is an object which is difficult to be detected, a warning cannot be given to a user.